﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

public class BaseMasterPage : System.Web.UI.MasterPage
{
    public User UserInfo
    {
        get
        {
            if (HttpContext.Current.Session["UserInfo"] == null)
            {
                User objUser = new User();
                HttpContext.Current.Session["UserInfo"] = (object)objUser;

            }
            return (User)HttpContext.Current.Session["UserInfo"];
        }
        set
        {
            HttpContext.Current.Session["UserInfo"] = value;
        }
    }
    
    override protected void OnLoad(EventArgs e)
    {
        Page.Header.Title = ThuVien.FunctionsUtils.GetConfigValue("SiteTitle");
        base.OnLoad(e);
    }

    public void ClearLoginInfo()
    {
        //clear Session
        Session.RemoveAll();
    }
}